//
//  NEDSheetView.h
//  MoreCoin
//
//  Created by 林宁宁 on 2019/9/23.
//  Copyright © 2019 MoreCoin. All rights reserved.
//

#import "NEDPopBaseView.h"
#import "NSMutableAttributedString+NED.h"

typedef NS_ENUM(NSInteger, NEDSheetOptionType) {
    NEDSheetOptionType_Normal,
    NEDSheetOptionType_Cancel,//确定 取消
    NEDSheetOptionType_Title,//标题
};


NS_ASSUME_NONNULL_BEGIN

@class NEDSheetItem;
@interface NEDSheetView : NEDPopBaseView

/**
 添加顶部标题
 */
- (void)addHeadTitle:(NSString *)title;
- (void)addHeadTitle:(NSString * _Nullable)title description:(NSString * _Nullable)description;
- (void)addHeadTitleBlock:(void(^)(NEDSheetItem * passItem))callBlock;


- (void)addOptionBlock:(void(^)(NEDSheetItem * passItem))callBlock action:(void(^ _Nullable)(NEDSheetView * alertV))action;
- (void)addOptionTitle:(NSString *)title action:(void(^ _Nullable)(NEDSheetView * alertV))action;
- (void)addOptionRedTitle:(NSString *)title action:(void(^ _Nullable)(NEDSheetView * alertV))action;
- (void)addOptionTitle:(NSString *)title titleColor:(UIColor *)titleColor action:(void(^ _Nullable)(NEDSheetView * alertV))action;

- (void)addCancel;
- (void)addCancelTitle:(NSString *)title;
- (void)addCancelBlock:(void(^)(NEDSheetItem * _Nullable passItem))callBlock action:(void(^ _Nullable)(NEDSheetView * alertV))action;

@end


@interface NEDSheetItem : NSObject

@property (copy, nonatomic) NSString * title;
@property (retain, nonatomic) NSMutableAttributedString * titleAtt;

@property (retain, nonatomic) UIColor * titleColor;
@property (assign, nonatomic) NSTextAlignment alignment;
@property (assign, nonatomic) NEDSheetOptionType optionType;
@property (assign, nonatomic) CGFloat cellHeight;

@property (copy, nonatomic) void(^clickBlock)(NEDSheetView * passSheetV);

@end

NS_ASSUME_NONNULL_END
